<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>{{account}}/{{repository}}</title>

    <style>
      body {
        box-sizing: border-box;
        padding: 20px;
        margin: 0;
        font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
        "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
        background: black;
        color: white;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        height: 100vh;
      }

      #wrap {
        display: flex;
        align-items: center;
        height: 100%;
      }

      main {
        width: 500px;
        margin: 0 auto;
      }

      header {
        display: flex;
        align-items: center;
        font-size: 24px;
        margin-bottom: 40px;
      }

      #release {
        flex-grow: 1;
      }

      #repo {
        font-weight: 800;
      }

      #date {
        color: gray;
        font-size: 18px;
      }

      .item {
        display: flex;
        align-items: center;
      }

      .item:not(:last-of-type) {
        margin-bottom: 14px;
      }

      .item a {
        color: #ff0387;
        text-decoration: none;
      }

      .item a:hover {
        text-decoration: underline;
      }

      .fileType {
       font-weight: 600;
       flex-grow: 1;
      }

      .url {
        font-weight: 400;
      }

      .size {
        color: #404040;
        white-space: nowrap;
      }

      footer {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
      }

      footer > * {
        margin-top: 40px;
      }

      footer a {
        color: gray;
        text-decoration: none;
      }

      footer a:hover {
        text-decoration: underline;
      }

      #version {
        margin-right: 8px;
        padding: 2px 6px;
        border-radius: 4px;
        background: linear-gradient(#ff00a5, #f65538)
      }

      #release-notes {
        font-weight: 600;
        color: white;
      }

      #all-releases {
        text-align: center;
        flex-grow: 1;
      }
    </style>
  </head>

  <body>
    <div id="wrap">
      <main>
          <header>
            <div id="release">{{account}}/<span id="repo">{{repository}}</span></div>
            <div id="date">{{date}}</div>
          </header>

          <div id="list">
            {{#each files}}
              <div class="item">
                <div class="fileType">{{@key}}: <span class="url"><a href={{this.url}}>/latest/{{@key}}</a></span></div>
                <div class="size">{{this.size}} MB</div>
              </div>
            {{/each}}
          </div>

          <footer>
            <div id="version">{{version}}</div>
            <a id="release-notes" href={{releaseNotes}}>Release Notes</a>
            <a id="all-releases" href={{allReleases}}>All Releases</a>
            <a href={{github}}>GitHub</a>
          </footer>
      </main>
    </div>
  </body>
</html>
